import asyncio
import datetime
import time
from time import sleep

import httpx

url = 'http://127.0.0.1:8000/eb/'
data = {
    'uid': 1,
    'username': '酥糖'
}

now = datetime.datetime.now()


async def fa():
    return httpx.post(url=url, data=data).text


async def pos():
    for i in range(50):
        await fa()


loop = asyncio.get_event_loop()
loop.run_until_complete(pos())

print(datetime.datetime.now() - now)
